<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>申报清单信息--详情展示</title>
    <%@include file="/WEB-INF/pages/common/taglib.jsp" %>
    <%@include file="/WEB-INF/pages/common/common.jsp" %>
    <style>
        .table3 tr {
            height: 40px;
            line-height: 40px;
            border: 1px #ccc solid
        }

        table td {
            word-break: break-all;
        }
    </style>
</head>
<body>
<div class="content content_frame">
    <h3 class="mainTitle"><img src="${basePath}/images/icon2.png"/>申报清单信息</h3>
    <br/>
    <ul class="contentNav dib-wrap">
        <li class="dib">
            <a onclick="javascript:history.go(-1)">
                <i class='fa fa-reply'></i>&nbsp;&nbsp;返&nbsp;回 </a>
        </li>
    </ul>
    <br/>
    <input type="hidden" name="id" value="${declHead.id}">
    <table class="table3">
        <tr>
            <th colspan="4">清单表头信息</th>
        </tr>
        <tr>
            <td width="15%">清单编号</td>
            <td width="35%">
                <label>${declHead.elistNo}</label>
            </td>
            <td width="15%">企业内部编号</td>
            <td width="35%">
                <label>${declHead.copNo}</label>
            </td>
        </tr>
        <tr>
            <td>预录入编号</td>
            <td>
                <label>${declHead.preNo}</label>
            </td>
            <td>担保企业编号</td>
            <td>
                <label>${declHead.assureCode}</label>
            </td>
        </tr>
        <tr>
            <td>账册编号</td>
            <td>
                <label>${declHead.bookNo}</label>
            </td>
            <td>订单编号</td>
            <td>
                <label>${declHead.orderNo}</label>
            </td>
        </tr>
        <tr>
            <td>电商平台代码</td>
            <td>
                <label>${declHead.ebpCode}</label>
            </td>
            <td>电商平台名称</td>
            <td>
                <label>${declHead.ebpName}</label>
            </td>
        </tr>
        <tr>
            <td>电商企业代码</td>
            <td>
                <label>${declHead.ebcCode}</label>
            </td>
            <td>电商企业名称</td>
            <td>
                <label>${declHead.ebcName}</label>
            </td>
        </tr>
        <tr>
            <td>物流运单编号</td>
            <td>
                <label>${declHead.logisticsNo}</label>
            </td>
            <td>物流企业代码</td>
            <td>
                <label>${declHead.logisticsCode}</label>
            </td>
        </tr>
        <tr>
            <td>物流企业名称</td>
            <td>
                <label>
                    ${declHead.logisticsName}
                </label>
            </td>
            <td>进出口标记</td>
            <td>
                <label>${'I' eq declHead.iEFlag?'进口':'出口'}</label>
            </td>
        </tr>
        <tr>
            <td>业务时间</td>
            <td>
                <label>${declHead.appDate}</label>
            </td>
            <td>业务状态</td>
            <td>
                <label>${'1' eq declHead.appStatus?'暂存':'申报'}</label>
            </td>
        </tr>
        <tr>
            <td>申报口岸代码</td>
            <td>
                <label>${declHead.customsCode}</label>
            </td>
            <td>进口口岸代码</td>
            <td>
                <label>${declHead.portCode}</label>
            </td>
        </tr>
        <tr>
            <td>订购人证件类型</td>
            <td>
                <label>
                    <c:if test="${'1' eq declHead.buyerIdType}">身份证</c:if>
                    <c:if test="${'2' eq declHead.buyerIdType}">其他</c:if>
                </label>
            </td>
            <td>订购人证件号码</td>
            <td>
                <label>${declHead.buyerId}</label>
            </td>
        </tr>
        <tr>
            <td>订购人姓名</td>
            <td>
                <label>${declHead.buyerName}</label>
            </td>
            <td>订购人电话</td>
            <td>
                <label>${declHead.consigneePhone}</label>
            </td>
        </tr>
        <tr>
            <td>订购人地址</td>
            <td>
                <label>${declHead.consigneeAddr}</label>
            </td>
            <td>申报企业代码</td>
            <td>
                <label>${declHead.agentCode}</label>
            </td>
        </tr>
        <tr>
            <td>申报企业名称</td>
            <td>
                <label>${declHead.agentName}</label>
            </td>
            <td>区内企业代码</td>
            <td>
                <label>${declHead.areaCode}</label>
            </td>
        </tr>
        <tr>
            <td>区内企业名称</td>
            <td>
                <label>${declHead.areaName}</label>
            </td>
            <td>贸易方式</td>
            <td>
                <label>
                    <c:if test="${'9610' eq declHead.tradeMode}">一般模式</c:if>
                    <c:if test="${'1210' eq declHead.tradeMode}">保税模式</c:if>
                </label>
            </td>
        </tr>
        <tr>
            <td>运输方式代码</td>
            <td>
                <label>${declHead.trafMode}</label>
            </td>
            <td>运输工具编码</td>
            <td>
                <label>${declHead.trafNo}</label>
            </td>
        </tr>
        <tr>
            <td>航班航次号</td>
            <td>
                <label>${declHead.voyageNo}</label>
            </td>
            <td>提运单号</td>
            <td>
                <label>${declHead.billNo}</label>
            </td>
        </tr>
        <tr>
            <td>监管场所代码</td>
            <td>
                <label>${declHead.loctNo}</label>
            </td>
            <td>许可证号</td>
            <td>
                <label>${declHead.licenseNo}</label>
            </td>
        </tr>
        <tr>
            <td>启运国</td>
            <td>
                <label>${declHead.country}</label>
            </td>
            <td>运费</td>
            <td>
                <label>${declHead.freight}</label>
            </td>
        </tr>
        <tr>
            <td>保费</td>
            <td>
                <label>${declHead.insuredFee}</label>
            </td>
            <td>币制</td>
            <td>
                <label>${declHead.currencyDisplay}</label>
            </td>
        </tr>
        <tr>
            <td>包装种类代码</td>
            <td>
                <label>${declHead.wrapType}</label>
            </td>
            <td>件数</td>
            <td>
                <label>${declHead.packNo}</label>
            </td>
        </tr>
        <tr>
            <td>毛重（kg）</td>
            <td>
                <label>${declHead.grossWeight}</label>
            </td>
            <td>净重（kg）</td>
            <td>
                <label>${declHead.netWeight}</label>
            </td>
        </tr>
        <tr>
            <td>状态</td>
            <td>
                <label>${func:dictItem('RETURN_STATUS_JN', declHead.status)}</label>
            </td>
            <td>状态时间</td>
            <td>
                <label>${declHead.statusTime}</label>
            </td>
        </tr>
        <tr>
            <td>申报日期</td>
            <td>
                <label>${declHead.declDate}</label>
            </td>
            <td>申报类型</td>
            <td>
                <label>
                    <c:if test="${'1' eq declHead.appType}">新增</c:if>
                    <c:if test="${'2' eq declHead.appType}">变更</c:if>
                    <c:if test="${'3' eq declHead.appType}">删除</c:if>
                </label>
            </td>
        </tr>
        <tr>
            <td>进口日期</td>
            <td>
                <label>${declHead.iEDate}</label>
            </td>
            <td></td>
            <td></td>
        </tr>
        <tr>
            <td>备注</td>
            <td colspan="3">${declHead.note}</td>
        </tr>
    </table>
    <br/>
    <table id="goods_info" class="table3">

    </table>
    <br/>
    <table id="corptable">
    </table>
    <div id="corptablePage">
    </div>
    <br/>
    <table id="container_info" class="table3">

    </table>
    <br/>
    <table id="container">
    </table>
    <div id="containerPage">
    </div>
    <br/>
</div>
<script type="text/javascript">
    $(function () {
        $(".table3 td:even").css("background-color", "#f5f5f5");
//        showCbecElistItem('null');
        $("#corptable").jqGrid({
            datatype: "json",
            url: "${basePath}/declareDetailQdc/queryTGoodsListQdcList?elistId=${id}",
            colNames: ['ID', '序号', '商品编码', '商品名称', '数量', '计量单位', '单价', '总价', '币制', '备注'],
            colModel: [{name: 'id', index: 'id', hidden: true}, {name: 'gNum', index: 'gNum', width: 40}, {
                name: 'hSCode', index: 'hSCode'
            }, {name: 'gName', index: 'gName'}, {name: 'qty', index: 'qty'}, {
                name: 'unitDisplay', index: 'unitDisplay'
            }, {name: 'price', index: 'price'}, {name: 'totalPrice', index: 'totalPrice'}, {
                name: 'currencyDisplay',
                index: 'currencyDisplay'
            }, {name: 'note', index: 'note'}],
            viewrecords: true,
            autowidth: true,
            height: 'auto',
            shrinkToFit: false,
            autoScroll: true,
            rowNum: 10, //每页显示记录数
            rowList: [10, 20, 100], //可调整每页显示的记录数
            rownumbers: true,
            rownumWidth: 15,
//            multiselect: true,
            pager: "#corptablePage", //分页工具栏
            sortname: "gNum",
            sortorder: "",
            loadComplete: function () {
                var rowNum = $(this).jqGrid('getGridParam', 'records');
                if (rowNum <= 0) {
                    if ($(this).parent().children('.norecords').length == 0)
                        $(this).parent().append("<div class=\"norecords\">暂无数据！</div>");
                    $(this).parent().children('.norecords').show();
                } else {
                    $(this).parent().children('.norecords').hide();
                    showCbecElistItem($("#corptable").jqGrid('getRowData')[0].id);
                }
                $(".ui-jqgrid tr.ui-row-ltr td").css('text-align', 'center');
            },
            ondblClickRow: function (rowid) {
                showCbecElistItem($("#corptable").jqGrid('getRowData', rowid).id);
            }
        });
    });

    function showCbecElistItem(id) {
        $("#goods_info").load('${basePath}/declareDetailQdc/loadDeclareBodyDetail', {id: id}, function () {
        });
    }
</script>
</body>
</html>

